package com.learning.spring.ioc.application.event;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * ClassName: ApplyEventListener
 * Description: 注解实现的应用事件监听器
 * Date: 2020/7/22 10:20 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
@Component
public class AnnotationApplyEventListener {

    @EventListener(classes = ApplyEvent.class)
    public void onApplicationEvent(ApplyEvent event) {
        System.out.println(" @EventListener 注解监听到的数据： " + event.getMsg());
    }
}